package com.dd.common.dto.system.file;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Schema(description = "更新文件DTO")
@Data
public class SysFileUpdateDTO implements Serializable {
    @NotNull(message = "文件ID不能为空")
    @Schema(description = "文件信息ID", example = "1", requiredMode = Schema.RequiredMode.REQUIRED)
    @Min(value = 1, message = "ID必须是正整数")
    private Long id;

    @Schema(description = "原文件名（也是文件管理中显示的名字，因此可以修改）", example = "logo.png")
    @Length(max = 250, message = "文件名长度不能超过250")
    private String originalFileName;
}
